<SCRIPT type="text/javascript">
	var setting = {
		data: {
			simpleData: {
				enable: true
			}
		},
		callback: {
			//onCollapse: alert("up"),
			onExpand: function(){
				if (treeNiceScroll) {
					treeNiceScroll.resize();
				}
			}
		},
		view: {
			showLine: false
		}
	};
	var zNodes1 =[
		{ id:"0", pId:0, name:"用户分组", open:true, icon:"/assets/images/icon-file-closed.png", url:"/${orgi}/manage/account/list/0.html",target:"_self"}
		<#if organList??>
		<#list organList as organ>
		,{ id:"${organ.id!''}", pId:"${organ.parentid!''}", name:"${organ.name!''}", icon:"/assets/images/usergroup.png" , url:"/${orgi}/manage/account/list/${organ.id!''}.html",target:"_self"}
		</#list>
		</#if>
	];
	$(document).ready(function(){
		var ztree = $.fn.zTree.init($(document.getElementById("zTree_adminLIst")), setting, zNodes1);
		ztree.selectNode(ztree.getNodeByParam("id", "${parentid!''}", null));
		<#if faild_users??>
		art.alert("<div style='height: 200px;width:500px; overflow: scroll;'>${successfulMsg!''}<br/><br/>未导入的有:{<#list faild_users as userStr> ${userStr} </#list>}</div>");
		</#if>
	});

	function submitSearchForm(action){
		$("#userform").attr("action","/${orgi}/manage/account/list/${parentid!''}.html");
		$("#beginNum").val($("#beginNumShow").val());
		$("#endNum").val($("#endNumShow").val());
		$("#username").val($("#show_username").val());
		$("#action").val(action);
		$("#userform").submit();
	} 

//提交用户复制表单
function submitCopyForm(){
	$("#userform").attr("action","/${orgi}/manage/account/usercopylist.html");
	$("#userform").submit();
}
//提交用户移动表单
function submitMoveForm(){
	$("#userform").attr("action","/${orgi}/manage/account/usermovelist.html");
	$("#userform").submit();
}
 
 
//提交用户删除表单
function submitDelForm(){
	if($("input[name='userid']:checked").length>0){
		art.confirm('您确定要删除这些用户吗？' 
		, function(){
			$("#userform").attr("action","/${orgi}/manage/account/userdellist.html");
			$("#userform").submit();
		
		} 
		, function(){})
		
	}else{
		alertMsg("请选择要删除的用户！");
	}
	
	
}
function checkSelectToMgr(id){
	if($("input[name='userid']:checked").length>0){
		$("#"+id).click();
	}else{
		alertMsg("请选择要操作的用户！");
	}
}

</SCRIPT>
<div class="rs_layout_top breadCrumbWrap">
	<div class="breadCrumbStart">您当前的位置是在：</div>
	<ul class="breadCrumb">
		<li class="bc_ithems"><a href="/${orgi}/manage/task/taskpassing.html">系统管理</a></li>
		<li class="bc_ithems"><a href="/${orgi}/manage/account/index.html">用户管理</a></li>
	</ul>
	
	<ul class="controlButtons" style="float: right">
		
		<li title="创建分组" data-width="550" href="/${orgi}/manage/account/organadd/${parentid}.html" id="organadd" data-toggle="ajax" class="icons_group_add"></li>
		<#if parentid!='0'>
		 <li title="修改分组" data-width="480" href="/${orgi}/manage/account/organedit/${parentid}.html" id="organedit" data-toggle="ajax" class="icons_group_edit"></li>
		 <li title="删除分组" onclick="art.confirm('您确定要删除此分组吗？' , function(){location.href='/${orgi}/manage/account/organdelo/${parentid}.html'} , function(){})" id="organdelo" class="icons_group_delete"></li>
		</#if>
		
		<li title="添加用户" data-width="700" href="/${orgi}/manage/account/useradd/${parentid}.html" id="newreport" data-toggle="ajax" class="cbtn-icon-32"></li>
		<#if isUm=='um'>
		<li title="添加UM用户" data-width="560" href="/${orgi}/manage/account/umuseradd/${parentid}.html" id="umuseradd" data-toggle="ajax" class="cbtn-icon-32"></li>
		</#if>
		 
		<li >
			<a href="/${orgi}/manage/account/templateexport/usertemplate.html" target="_blank" title="模板下载">
				<img src="/assets/images/excel.png" style="margin-top: 3px;  margin-left: 3px;">
			</a>
		</li>
		<li title="导入用户" class="cbtn-icon-45" href="/${orgi}/manage/account/userimport/${parentid}.html" data-width="600" id="dbsourceimport" data-toggle="ajax"></li>
	</ul>
	<div style="float: right">
		<input style="margin-top: 4px;border: 1px solid #cccccc;height: 14px;padding: 4px;"  size="25"  id="show_username" maxlength="30" name="show_username" value="${username!''}" type="text">
		<span class="help-inline"></span>
		<span class="btnWrap" style="margin-top:20px;">
			&nbsp;&nbsp;<input type="button" style="padding-top:5px" onclick="$('#beginNumShow').val('1');$('#endNumShow').val('20');submitSearchForm('current');" class="subButtonStyle" value="查询"> 
		</span>
	
	</div>
</div>
<div class="rs_layout_left" resizable="true" style="width:230px;">
	<div class="lftTreeWrap">
		<div class="ztree" id="zTree_adminLIst"></div>
	</div>
</div>
<!--<div class="rs_layout_right" style="width:300px;"></div>-->
<div class="rs_layout_center">
	<div class="rs_layout">

		<div class="rs_layout_center">
		
		
			<div class="tableScrollWrap">
				<form id="userform" action="" method="post"  data-toggle="form"  data-callback="closeR3ArtDialog();">
				<input type="hidden" name="organid" id="organid" value="0">
				<input type="hidden" name="username" id="username" value="${username!''}">
				<input type="hidden" name="old_organid" id="old_organid" value="${parentid}">
				<input type="hidden" id="beginNum" name="beginNum" value="">
				<input type="hidden" id="endNum" name="endNum" value="">
				<input type="hidden" id="action" name="action" value="current">
				<table class="table_style_1">
								<thead>
									<tr>
										<th></th>
										<th><i class="verMidWrap">用户名</i><i class="tbArrow"></i></th>
										<th><i class="verMidWrap">部门</i><i class="tbArrow"></i></th>
										<th class="minSize"><i class="verMidWrap">电子邮件</i><i class="tbArrow"></i></th>
										<th class="minSize minIsHide"><i class="verMidWrap">昵称</i><i class="tbArrow"></i></th>
										<th class="minSize">操作</th>
									</tr>
								</thead>
								<tbody>
									
									<#if userorganList??>
									<#list userorganList as ou>
									<tr>
										<td class="tdIcons"><input name="userid" value="${ou.user.id!''}" type="checkbox"></td>
										<td><a href="/${orgi}/manage/account/userreportlist/0.html?userid=${ou.user.id!''}" target="report" class="report">
											<i class="icons_tablelist_user"></i>${ou.user.username!''}</a></td>
										<td>${ou.user.department!''}</td>
										<td>${ou.user.email!''}</td>
										<td class="minSize">${ou.user.nickname!''}</td>
										<td class="minSize">
											<i data-width="700" title="修改用户" href="/${orgi}/manage/account/${ou.organid!''}/useredit/${ou.user.id!''}.html" id="organedit" data-toggle="ajax" class="tbControlIcon tci-7"></i>
											<#if isUm!='um'>
											<a title="重置密码" href="javascript:void(0)" onclick="art.confirm('您确定要重置此用户密码吗？' , function(){location.href='/${orgi}/manage/account/${ou.organid!''}/${ou.user.id!''}/resetpasswordo.html'} , function(){})"><i class="tbControlIcon resetpassword"></i></a>
											</#if>
											
											<a title="删除用户" href="javascript:void(0)" onclick="art.confirm('您确定要删除此用户吗？' , function(){location.href='/${orgi}/manage/account/${ou.organid!''}/userdelo/${ou.user.id!''}.html'} , function(){})"><i class="tbControlIcon tci-6"></i></a>
										</td>
									</tr> 
									</#list>
									</#if>
								</tbody>
							</table>
							</form>
			</div>

		</div>
		<div class="rs_layout_bottom toolBar_bottom" style="overflow: hidden">
			<div class="papers_1" style="float:left;line-height:18px;margin:0 10px 0 500px;">
				<span ><label style="font-size: 13px;">条目&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" style="width: 30px;height: 10px;" id="beginNumShow" value="${beginNum!'1'}"/><label style="font-size: 13px;">-</label><input style="width: 30px;height: 10px;" type="text" id="endNumShow" value="${endNum!'20'}"/></span>
				<img class="pageElems" onclick="submitSearchForm('current');" title="查询" alt="查询" src="/assets/images/action_go.gif"/>
				<img class="pageElems" onclick="submitSearchForm('first');" title="首页" alt="首页" src="/assets/images/go-first-view.png"/>
				<img class="pageElems" onclick="submitSearchForm('last');" title="上一页" alt="上一页" src="/assets/images/go-previous-view.png"/>			
				<img class="pageElems" onclick="submitSearchForm('next');" title="下一页" alt="下一页" src="/assets/images/go-next-view.png"/>
				<img class="pageElems" onclick="submitSearchForm('final');" title="尾页" alt="尾页" src="/assets/images/go-last-view.png"/>
			</div>
			
			<ul class="toolbarBottom_IconWrap">
				<li class="tb-icons-1" title="复制用户" onclick="checkSelectToMgr('usercopy')"></li>
				<li class="tb-icons-2" title="移动用户" onclick="checkSelectToMgr('usermove')"></li>
				<li title="复制用户" href="/${orgi}/manage/account/usercopy.html" id="usercopy" data-width="480" data-toggle="ajax" style="display: none"></li>
				<li title="移动用户" href="/${orgi}/manage/account/usermove.html" id="usermove" data-width="480" data-toggle="ajax"  style="display: none"></li>
				<li onclick="submitDelForm();" class="tb-icons-4"></li>
			</ul>
		</div>
	</div>
</div>
